package org.bpm.models
{
	import flash.geom.Point;
	
	import org.bpm.view.Map;

	/**
	 * This is a model for a transition line.
	 * 
	 * */
	public class MapLineModel
	{
		/**
		 * Start node and end node are nodes that connected by this line.
		 * */
		public var startNodeId:String;
		public var endNodeId:String;
		
		/**
		 * Label is the text displayed in the related text field beside this line,
		 * it's not necessary for a line to have a label.
		 * */
		public var label:String;
		
		/**
		 * Position of the label text field.
		 * */
		public var labelPosition:Point;
		
		/**
		 * Indicates whether this line is processed.
		 * */
		public var isDone:Boolean;
		
		/**
		 * A xmllist node that contains the transition information.
		 * */
		public var definitionList:XMLList;
		
		public function MapLineModel(pStartNodeId:String,pEndNodeId:String,pLabel:String="",pLabelPosition:Point=null)
		{
			startNodeId = pStartNodeId;
			endNodeId = pEndNodeId;
			label = pLabel;
			labelPosition = pLabelPosition ? pLabelPosition : (new Point());
		}
	}
}